package com.yuda.tools.authreport.service.impl;

import com.yuda.common.datasource.annotation.Baoming;
import com.yuda.tools.authreport.entity.StudentInfo;
import com.yuda.tools.authreport.mapper.StudentInfoMapper;
import com.yuda.tools.authreport.service.StudentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import javax.ws.rs.Path;
import java.util.List;


@Service
public class StudentInfoServiceImpl implements StudentInfoService {

    @Autowired
    StudentInfoMapper studentInfoMapper;

    @Override
    public List<StudentInfo> selectStu(String message) {
        return studentInfoMapper.selectStu(message);
    }

    @Override
    public List<StudentInfo> selectExam(String message, String examUuid) {
        return studentInfoMapper.selectExam(message, examUuid);
    }

    //查询头像图片
    @Baoming
    @Override
    public String existsHeadPortrait(String idCard) {
        String checked = studentInfoMapper.isCheckedIdCard(idCard);
        if (checked != null && checked.equals("1")) {
            return studentInfoMapper.getAvatar(idCard);
        }
        return null;
    }
}

